package com.formation.userbase.persistance.services;

import java.util.List;

import com.formation.userbase.persistance.beans.User;
import com.formation.userbase.persistance.dao.UserDao;
import com.formation.userbase.persistance.dao.UserJdbcDao;
//import dao.UserJdbcDao;

public class UserJdbcService implements UserService {
	UserDao monDao;
	
	
	public UserJdbcService(){
		monDao=new UserJdbcDao();
	}
	

	@Override
	public User findUserByLogin(String Login) {
		// TODO Auto-generated method stub
		return monDao.findUserByLogin(Login);
	}

	@Override
	public boolean insert(User u) {
		// TODO Auto-generated method stub
		if(monDao.insert(u))
			return true;
		else
			return false;

	}
	
	@Override
	public List<User> getAllUser(){
		return monDao.getAllUser();
	}

}
